<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class Order extends Model
{
    use HasDateTimeFormatter, SoftDeletes;

    protected $guarded = [];


    //用户
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    //项目
    public function project(): BelongsTo
    {
        return $this->belongsTo(Project::class);
    }

    //资料
    public function material(): BelongsTo
    {
        return $this->belongsTo(Material::class);
    }
}
